package com.zhenjizhenpin.mybatis.session.defaults;

import com.zhenjizhenpin.mybatis.session.Configuration;
import com.zhenjizhenpin.mybatis.session.SqlSession;
import com.zhenjizhenpin.mybatis.session.SqlSessionFactory;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
